package valueObject;

import entity.User;

/**
 *
 * @author Juan Hernández
 */
public class UserVO implements ValueObject<User> {
    private String username;
    private String password;
    private RoleVO role;
    
    @Override
    public User toEntity() {
        User user = new User();
        user.setPassword(password);
        user.setRoleidRole(role.toEntity());
        user.setUsername(username);
        return user;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public RoleVO getRole() {
        return role;
    }

    public void setRole(RoleVO role) {
        this.role = role;
    }

}
